STEP 9: Each time the loop counts the frequency of a value in the sample_space, we'll store that count in a list.

Lists store values in order, so the first number in our freq_list links to the first value in our sample_space.

  • In LOGIC, click on . Drag Append into your loop.
  • Change the name in front to freq_list.
  • Change the value in .append() to freq.


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)